<?php

namespace IDock\Insurance\HBIC\Request;

use IDock\Insurance\DAJIA\Response\InsuranceOrderQueryResponse;
use IDock\Insurance\HBIC\Bean\BASEPART;
use IDock\Insurance\HBIC\Bean\CAR;
use IDock\Insurance\HBIC\Bean\CARSHIPTAX;
use IDock\Insurance\HBIC\Bean\CHANGEBASEPART;
use IDock\Insurance\HBIC\Bean\DEVICE;
use IDock\Insurance\HBIC\Bean\KIND;
use IDock\Insurance\HBIC\Bean\NOCAR;
use IDock\Insurance\HBIC\Bean\PERSONNEL;
use IDock\Insurance\HBIC\Response\CommonResponse;

class SichuanTrafficVehicleRequest extends AllHBICRequest
{
    protected $requestType = '249';
    protected $comCode = '2500000000';

    protected $methodName = 'queryVehicleForSC';

    protected $resourceType = 'CNinsure';

    protected $response = CommonResponse::class;

    protected $urlTip = '四川交管车辆查询';
    protected $licenseKindCode = '';
    protected $licenseNo = '';
    protected $Vin = '';

    public function generate(): array
    {
        $param = [
            'head' => [
                'requestType' => '0022',
                'messageId' => 'ece849ff-87b2-454c-bdbd-9ffea8137f45',
                'userId' => 'SCXN000014',
                'passWord' => 'Ab123456',
                'ComCode' => ''
            ],
            'body' =>
                [
                    'resourceType' => $this->resourceType,
                    'methodName' => $this->methodName,
                    'baseInfo' => [
                        'licenseKindCode' => $this->licenseKindCode,
                        'licenseNo' => $this->licenseNo,
                        'Vin' => $this->Vin,
                    ]]
        ];

        foreach ($param['body'] as $key => $val) {
            if (empty($val)) {
                unset($param['body'][$key]);
            }
        }
        return $param;
    }

    /**
     * @param string $licenseKindCode
     */
    public function setLicenseKindCode(string $licenseKindCode): void
    {
        $this->licenseKindCode = $licenseKindCode;
    }

    /**
     * @param string $licenseNo
     */
    public function setLicenseNo(string $licenseNo): void
    {
        $this->licenseNo = $licenseNo;
    }

    /**
     * @param string $Vin
     */
    public function setVin(string $Vin): void
    {
        $this->Vin = $Vin;
    }



}